package com.kikcn.spring.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * User: wlai
 * Date: 3/19/15
 * Time: 16:04 PM
 */

@Aspect
@Component
public class DoBeforeSayHello {
    @Pointcut("execution(* getName())")
    public void shakeHand(){
    }

    @Before("shakeHand()" )
    public void bbbbb() throws Throwable {
        System.out.println("Shake...");
    }
}
